/*************************************************************************
	> File Name: udp_server.cc
	> Author: H.M. Lau
	> Mail: hm.lau@outlook.com
	> Created Time: 2023/10/01 15:16
 ************************************************************************/

#include "udp_server.hpp"
#include <memory>

static void usage(std::string proc)
{
    std::cout << "\nUsage" << proc << "port\n" << std::endl;
}

int main(int argc, char *argv[])
{
    if (argc != 2) {
        usage(argv[0]);
        exit(1);
    }
    uint16_t port = atoi(argv[1]);
    std::unique_ptr<UdpServer> svr(new UdpServer(port));
    svr->initServer();
    svr->start();
    return 0;
}


